// internal/model/collection.go
// 推测文件缺少包声明，添加包声明
package model

import "time"

type CollectionConfig struct {
	ID           uint      `gorm:"primaryKey"`
	ConfigName   string    `gorm:"type:varchar(50);uniqueIndex;comment:配置名称"`
	Description  string    `gorm:"type:varchar(200);comment:配置描述"`
	DBType       string    `gorm:"type:varchar(20);comment:目标数据库类型"`
	SQLContent   string    `gorm:"type:text;comment:采集SQL语句"`
	Params       string    `gorm:"type:json;comment:参数模板(JSON数组)"`
	FieldMapping string    `gorm:"type:json;comment:字段映射规则(JSON对象)"`
	DataRules    string    `gorm:"type:json;comment:数据处理规则(清洗/转换)"`
	Version      int       `gorm:"comment:配置版本号"`
	CreatedBy    string    `gorm:"type:varchar(50);comment:创建人"`
	CreatedAt    time.Time `gorm:"comment:创建时间"`
	UpdatedAt    time.Time `gorm:"comment:更新时间"`
}
